package top.fullj.remoting.provider;

import com.google.common.base.MoreObjects;

/**
 * @author bruce.wu
 * @since 2022/2/14 14:43
 */
public class ServiceConfig {

    private final String name;

    private final Class<?> type;

    public ServiceConfig(String name, Class<?> type) {
        this.name = name;
        this.type = type;
    }

    public String getName() {
        return name;
    }

    public Class<?> getType() {
        return type;
    }

    @Override
    public String toString() {
        return MoreObjects.toStringHelper(this)
                .omitNullValues()
                .add("name", name)
                .add("type", type.getName())
                .toString();
    }

}
